package responsechain.handeler.impl;

import responsechain.handeler.Interview;
import responsechain.handeler.Handler;

public class ProductionPart extends Handler {
    @Override
    public boolean handle(Interview interview) {
        String name = interview.getName();
        log.i(name+":正在 "+getPartName()+" 进行招聘");
        if (interview.getSex()==0){
            log.w(name +": 性别不满足");
           return next(interview);
        }else if (interview.getEnglish()<=85){
            log.w(name +": 英语成绩不满足");
            return next(interview);
        }
        return offer(interview) || next(interview);    }

    @Override
    public int getHc() {
        return 2;
    }
    @Override
    protected String getPartName() {
        return "生产部";
    }
}
